package com.platform.web;

import com.platform.client.ControlServiceClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.Map;

/**
 * Created by 隔壁老王 on 2018/6/29.
 */
@Controller
public class MainController {
//    @Qualifier("controlServiceHystrix")
    @Autowired
    ControlServiceClient client;
    @GetMapping("index")
    public String index(){
        return "/index";
    }
    @GetMapping("test")
    public String test(Map<String,Object>map){
        String result = client.test();
        map.put("result",result);
        return "/test";
    }
}
